Never show the Trash in the FileChooserWidget side bar
authorEmmanuele Bassi <ebassi@gnome.org>
Sun, 20 Jun 2021 14:39:41 +0000 (15:39 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 20 Jun 2021 14:44:22 +0000 (15:44 +0100)
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.

Fixes: #674
gtk/gtkfilechooserwidget.c
gtk/ui/gtkfilechooserwidget.ui

index d03c796540a16a7deb6a504a3ff72155afc07007..918206ac263debb8b1bffc47333406af267f5215 100644 (file)
@@ -2834,7 +2834,6 @@ update_appearance (GtkFileChooserWidget *impl)
     {
       save_widgets_create (impl);
       gtk_places_sidebar_set_show_recent (GTK_PLACES_SIDEBAR (impl->places_sidebar), FALSE);
-      gtk_places_sidebar_set_show_trash (GTK_PLACES_SIDEBAR (impl->places_sidebar), FALSE);
 
       if (impl->select_multiple)
         {
index 876c67f332f8a1c5d64ce71fc4658946c8d90652..9346afd767ede0f0dce6e63347bf425fc95c9125 100644 (file)
@@ -17,6 +17,7 @@
                 <child>
                   <object class="GtkPlacesSidebar" id="places_sidebar">
                     <property name="show-other-locations">1</property>
+                    <property name="show-trash">0</property>
                     <style>
                       <class name="sidebar"/>
                     </style>